/**
 * ProductInfoProjectMapperExt
 * Copyright © 2015 - 2017
 * All rights reserved.
 * -----------------------------------
 * 2017-11-21  Created
 */
package com.lzy.product.dao;

import com.lzy.product.dtos.ProductInfoProjectDto;
import com.lzy.product.entity.ProductInfoProject;
import org.apache.ibatis.annotations.Param;

import javax.annotation.Resource;
import java.util.List;

@Resource
public interface ProductInfoProjectMapperExt extends ProductInfoProjectMapper {

    List<ProductInfoProjectDto> query(@Param("param") ProductInfoProjectDto dto);

    int deleteByProductId(@Param("param") ProductInfoProjectDto dto);

    /**
     * 通过订单编号和包含项编号查询订单包含项信息
     *
     * @param productId
     * @param projectId
     * @return
     */
    ProductInfoProjectDto findByProductIdAndProjectId(@Param("productId") Long productId, @Param("projectId") Long projectId);

    List<ProductInfoProjectDto> findByProductId(@Param("productId") Long productId);
}